

# AdapterType

<div class="api-docs__separator" data-reactroot="">

---

</div><div class="api-docs__import" data-reactroot="">

```ts
import { AdapterType } from "@hyper-fetch/sockets"
```

</div><div class="api-docs__section">

## Description

</div><div class="api-docs__description"><span class="api-docs__do-not-parse">



</span></div><p class="api-docs__definition">

Defined in [adapter/adapter.types.ts:8](https://github.com/BetterTyped/hyper-fetch/blob/c44d728f/packages/sockets/src/adapter/adapter.types.ts#L8)

</p><div class="api-docs__section">

## Preview

</div><div class="api-docs__preview type">

```ts
type AdapterType = {
  connect: () => void; 
  connecting: boolean; 
  disconnect: () => void; 
  emit: (eventMessageId: string, emitter: EmitterInstance, ack?: (error: Error | null, response: any) => void) => void; 
  listen: (listener: ListenerInstance, callback: ListenerCallbackType) => RemoveListenerCallbackType; 
  listeners: Map<string, Set<ListenerCallbackType>>; 
  reconnect: () => void; 
  removeListener: (name: string, callback: (...args: any) => void) => void; 
}
```

</div><div class="api-docs__section">

## Structure

</div><div class="api-docs__returns">

```ts
{
  connect: () => void;
  connecting: boolean;
  disconnect: () => void;
  emit: (eventMessageId: string, emitter: EmitterInstance, ack?: (error: Error | null, response: any) => void) => void;
  listen: (listener: ListenerInstance, callback: ListenerCallbackType) => RemoveListenerCallbackType;
  listeners: Map<string, Set<ListenerCallbackType>>;
  reconnect: () => void;
  removeListener: (name: string, callback: (...args: any) => void) => void;
}
```

</div>